package cn.kjcoder.orderServer.web.controller;

import cn.kjcoder.orderServer.Order;
import cn.kjcoder.orderServer.OrderServer;
import cn.kjcoder.orderServer.service.IOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author hkj
 * @email 1349091387@qq.com
 * @date 2021/12/21
 * 源码允许修改，并且本人十分乐意有 大佬 来对代码进行 随 意 调 教
 **/
@RestController
@Slf4j
public class OrderController {

    @Autowired
    private IOrderService orderService;


    @RequestMapping("/order/get")
    public Order get(Long userId,Long productId){
        log.info("订单表现层调用");
        return orderService.createOrder(userId,productId);
    }
}
